#pragma once
#include <QDialog>
#include "ui_ZYunshuWidget.h"
#include "..\..\ZWuliuSvr\DBOpt\ZDBWuliuPaiche.h"
#include "..\ZWuliuSvr\DBOpt\ZDBWuliuPackage.h"
#include "..\ZDBBind\ZHtmlStr4PrintCreator.h"



class ZYunshuWidget : public QDialog
{
	Q_OBJECT
private:
	enum
	{
		SelCol = 1
	};

public: 
	ZYunshuWidget(ZWidgetMode mode, bool bLocalMode/* = false*/, QWidget *parent = 0, Qt::WFlags flags = 0);
	virtual ~ZYunshuWidget(void);

public:
	ZDBWuliuPaiche GetPaiche() const { return m_selectedPaiche; }

public slots:
	void _onAddChe(bool bChecked);
	void _onRefreshPaiChe(bool bChecked);
	void _onRefreshPaiCheAll(bool bChecked);
	void _onRefreshPaiCheByTime(bool bChecked);
	void _onPrintPaiche(bool bChecked);
	void _onSearchByYunDanID(bool bChecked);
	void _onDaoChe(bool bChecked);


	void _onOpenPaicheLinkLabel(QString sLink);
	void _onOpenYundanLinkLabel(QString sLink);

private:
	void _reloadPaicheTable();
	void _reloadYundanTable();

private:
	Ui::ZYunshuClass				ui;
	ZWidgetMode						m_mode;
	std::vector<ZDBWuliuPackage>	m_vecTmpPackage;
	std::vector<ZDBWuliuPaiche>		m_vecPaiche;
	ZDBWuliuPaiche					m_selectedPaiche;		
	bool							m_bLocalMode;
};

